<%-- 
    Document   : db1
    Created on : 2014/8/19, 下午 01:25:56
    Author     : Yu
--%>

<%@page import="java.sql.Statement"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Connection"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    Class.forName("com.mysql.jdbc.Driver");
    Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/javadb", "root", "007341");
    Statement st = con.createStatement();
    String sql = "insert into person(username,tel,birthday)values('Bob','002-29420552','0123')";
    int x = st.executeUpdate(sql);
    st.close();
    con.close();


%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>db1</title>
    </head>
    <body>
        <h1>-----db1-----</h1>
	<%=  x   %>	


    </body>
</html>
